package 实用类作业.secondtquestion;

import com.sun.xml.internal.ws.util.StringUtils;

import java.util.Scanner;

public class Findyisi {
    public static void find(String str1,String str2){
        int index=str1.indexOf(str2);
        String string=str1.substring(index);
    }

    public static void main(String[] args) {
           String str="你这是什么意思?没什么意思，意思意思而已，小意思!";
           Scanner scanner = new Scanner(System.in);
           System.out.println("请输入一个字符串:");
           String str1=scanner.next();
           int count=0;
        for (int i = 0; i <str.length() ; i++) {
            String s = str.substring(i,i+1);
            if (s.equals(str1)){
                count++;
            }
        }
        System.out.println(count);
    }
}
